package com.zbkj.dal.base.enums;

import com.zbkj.dal.common.exception.CrmebException;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

@AllArgsConstructor
public enum OrderAddressBizType {

    /**
     * 订单子阶段类型
     */

    PURCHASE("购买订单"),

    SHARED_CREATE("供享订单 创建订单取件"),

    RENT_CREATE("承享订单创建"),

    RENT_RETURN("承享订单归还"),

    ;

    @Getter
    private final String message;

    public static OrderSubStageType of(String code) {
        for (OrderSubStageType value : OrderSubStageType.values()) {
            if (StringUtils.equals(value.name(), code)) {
                return value;
            }
        }
        throw new CrmebException("不支持的类型");
    }


}
